<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>

<body>
  <button>hdr</button>
  <button>hdcms</button>
</body>
<script>
  let btns = document.querySelectorAll("button");

  btns.forEach(i => {
    i.addEventListener("click", function () {
      let left = 1;
      setInterval(function () {
        i.style.left = left++ + "px";
      }, 5);
    })
  })
</script>

</html>